# -*- coding: utf8 -*-
# Django settings for ponto_eletronico project.

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
    # ('Your Name', 'your_email@domain.com'),
)

MANAGERS = ADMINS

DATABASE_ENGINE = 'mysql'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = 'ponto'             # Or path to database file if using sqlite3.
DATABASE_USER = 'ponto'             # Not used with sqlite3.
DATABASE_PASSWORD = 'topon'         # Not used with sqlite3.
DATABASE_HOST = '127.0.0.1'             # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = ''             # Set to empty string for default. Not used with sqlite3.

# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'UTC/GMT+2' # como o brasil eh -3, tem que colocar +3...

# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
#LANGUAGE_CODE = 'en-us'
LANGUAGE_CODE = 'pt-br'

SITE_ID = 2

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True

# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
import os 
MEDIA_ROOT = os.path.abspath('./media/')

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = '/ponto/media/'

# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/ponto/media/admin/'

# Make this unique, and don't share it with anybody.
SECRET_KEY = '9&+n1uo_r9(pw(o2q9qwjggv7nm(i@g4*$8isqe_*^y=9$79^2'

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.load_template_source',
    'django.template.loaders.app_directories.load_template_source',
#     'django.template.loaders.eggs.load_template_source',
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
)

TEMPLATE_CONTEXT_PROCESSORS = (
    'django.core.context_processors.auth',
    'django.core.context_processors.debug',
    'django.core.context_processors.i18n',
    'django.core.context_processors.media',
    'ponto_eletronico.ponto.context_processors.ponto_url',


)

ROOT_URLCONF = 'ponto_eletronico.urls'

TEMPLATE_DIRS = (
    #    '/home/note/teste_django/ponto_eletronico/templates',
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
#    'django.contrib.sites',
    'django.contrib.admin',
    'ponto_eletronico.ponto',
)


SESSION_COOKIE_NAME='ponto_sessaoid'
AUTHENTICATION_BACKENDS =(
	'django.contrib.auth.backends.ModelBackend',
	'ponto_eletronico.ldap_backend.LdapBackend',
	'ponto_eletronico.settings_backend.SettingsBackend', 
)
# settings_backend configuracao
ADMIN_LOGIN = 'root' 
ADMIN_PASSWORD = 'sha1$0eb8a$de3acde0986aede87c30bdd180ba3d44dc7c382b' 

# Ldap backend configuracao
LDAP_URI = 'ldap://ldap.ncd.org.br'
LDAP_DN_USERS ='ou=users,ou=vitoria,dc=ncd,dc=org,dc=br'
import senhas
LDAP_SENHA = senhas.LDAP_SENHA
LDAP_GRUPOS = ['monitor','aluno','secretario']
NCDSIS_GRUPOS = {'monitor':'Monitores','aluno':'Alunos','secretario':'Secretários'}
